package myapps.ttclient.protocol.message;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

import myapps.ttclient.Helper;
import myapps.ttclient.baseclass_and_interface.TTClientMessage;

public class SignOutResponseMessage extends TTClientMessage
{
	public Boolean result;
	public String text;
	
	public SignOutResponseMessage(Boolean result, String text)
	{
		this.result = result;
		this.text = text;
	}

	public static TTClientMessage parse(DataInputStream dis) throws IOException
	{
		int result = dis.readInt();
		String text = Helper.ParseAsString(dis);
		
		return new SignOutResponseMessage(result == 1 ? true : false , text);
	}

	@Override
	public void toDataOutputStream(DataOutputStream dos) throws IOException
	{
		throw new IOException("NotImplementedException");
	}
}